home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.src.lzh / relay / io.c < prev    next >
C/C++ Source or Header  |  1989-06-27  |  500b  |  30 lines

  1. /*
  2.  * common i/o operations
  3.  */
  4.  
  5. #include <stdio.h>
  6. #ifndef AMIGA
  7. #  include <sys/types.h>
  8. #endif /* AMIGA */
  9. #include "news.h"
  10. #include "headers.h"
  11. #include "article.h"
  12. #include "msgs.h"
  13.  
  14. /*
  15.  * If *fpp is non-null, fclose it and check for errors.
  16.  * On error, call fulldisk(art, name).
  17.  */
  18. void
  19. nnfclose(art, fpp, name)
  20. struct article *art;
  21. register FILE **fpp;
  22. char *name;
  23. {
  24.     if (*fpp != NULL) {
  25.         if (nfclose(*fpp) == EOF)
  26.             fulldisk(art, name);
  27.         *fpp = NULL;        /* mark the stream closed */
  28.     }
  29. }
  30.